##parameters=index_name, componentIdentity

component = context.getComponentByIdentity( componentIdentity )

if (not index_name) or (" " in index_name):
    raise "Invalid index name"

if not component:
    raise "ComponentNotFound", "Could not find component " + componentIdentity


component.setSearchIndex( index_name )
component.onAfterEdit()

 
return context.REQUEST.RESPONSE.redirect( context.absolute_url() + '/showSearchIndexSummary' )